home *** CD-ROM | disk | FTP | other *** search
- Path: in1.uu.net!tandem!gautam
- From: gautam@everest.tandem.com (vallabha_gautam)
- Newsgroups: comp.lang.c++
- Subject: Flattening a class hierarchy
- Followup-To: comp.lang.c++
- Date: 15 Feb 1996 20:35:56 GMT
- Organization: Tandem Computers, Inc.
- Sender: gautam@nskernel.tandem.com
- Distribution: world
- Message-ID: <4g05fc$df0@gazette.tandem.com>
- NNTP-Posting-Host: knight.nskernel.tandem.com
-
- Hi.
-
- I am looking for a tool that will do the following -
-
- Given a set of C++ header files, extract the structure
- layout of each class, and maybe display it as a C structure.
- For example, with two C++ classes
-
- class myrootclass {
- int x;
- int y;
- }
-
- class myderivedclass : myrootclass {
- int z;
- }
-
- The program should translate it to the following, say, C structures.
-
- struct myrootclass {
- int x;
- int y;
- }
-
- struct myderivedclass {
- int x; // these two variables are
- int y; // from myrootclass
- int z;
- }
-
- The reason we need it is to look at memory dumps - it the
- dump analyzer/debugger does not understand C++, it becomes
- a major pain to trace through and find the offsets of the
- elements of the class. Is it possible to use 'cfront' to
- do the job described above?
-
- thanks in advance,
- --gautam
-
-
- p.s: I did look through the newsgroup FAQ, and searched
- through some C++ home pages, but could not find anything.
-
-
-